package com.bt.lms.ui.page.common.action.pagerecord;

import com.bt.lms.ui.vo.PageSkipInfo;
import com.bt.lms.ui.page.school_education.PageStudentList;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.Pane;

/**
 * 学籍信息管理标签事件
 */
public class RecruitStuLabAction implements EventHandler<MouseEvent> {

    /**
     * 界面跳转数据
     */
    public static PageSkipInfo pageSkipInfo;

    /**
     * 构造事件
     * @param pageSkipInfo 界面跳转数据
     */
    public RecruitStuLabAction(PageSkipInfo pageSkipInfo) {
        RecruitStuLabAction.pageSkipInfo = pageSkipInfo;
    }

    @Override
    public void handle(MouseEvent event) {
        PageStudentList pageStudentList = new PageStudentList();
        Pane pane = pageSkipInfo.getPane();
        ObservableList<Node> children = pane.getChildren();
        Integer index = pageSkipInfo.getIndex();
        children.set(index,pageStudentList);

    }
}
